Drop
TheDrop
method should move or copy the dragged data into this part.
ODDropResult Drop (in ODDragItemIterator dropInfo, in ODFacet facet, in ODPoint where);
dropInfo
- A reference to a drag-item iterator that describes the content, as well as the types and values, of the dragged data.
facet
- A reference to a facet where the drop has occurred.
where
- The location of the drop point, expressed in frame coordinates.
- return value
- The result of the drop operation. The return value is one of the following:
kODDropFail
,kODDropCopy
,kODDropMove
, orkODDropUnfinished
.DISCUSSION
The return valuekODDropFail
indicates an unsuccessful synchronous drop. On platforms that support asynchronous drag-and-drop operations, the return valuekODDropUnfinished
indicates that an asynchronous drop is in progress. The return valuekODDropCopy
indicates a successful synchronous drop with copy semantics. The return valuekODDropMove
indicates a successful synchronous drop with move semantics. These copy and move semantics are determined by examining the drag attributes and determining whether to display the Paste As dialog box. If a link is created, then your part'sDrop
method should returnkODDropCopy
, regardless of the drag attributes.OpenDoc calls this method when the mouse button is released while the drag point is within a facet that can accept a drop.
Your part's
Drop
method should examine the part kinds of the dragged data (using the drag-item iterator specified by thedropInfo
parameter) and determine whether it can accept the dragged data. If your part can accept a drop, this method should incorporate or embed the dropped data and return an appropriate return value indicating the result of the drop operation. If your part cannot accept a drop, this method should returnkODDropFail
.OVERRIDING
When you subclassODPart
, you can override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.EXCEPTIONS
kODErrDoesNotDrop
- This part does not support drag and drop.
SEE ALSO
TheODDropResult
type (page 922).
TheODPoint
type (page 885).
TheODDragAndDrop::GetDragAttributes
method (page 191).
TheODDragAndDrop::ShowPasteAsDialog
method (page 192).
TheODPart::DropCompleted
method (page 508).
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Paste As" on page 250 in OpenDoc Programmer's Guide.
"Dropping" on page 364 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help